<div class="da-list-wrap">
  <div class="da-content-banner">
    <d-breadcrumb>
      <d-breadcrumb-item><a routerLink="/">{{ 'inventory.breadcrumb.home' | translate }}</a></d-breadcrumb-item>
      <d-breadcrumb-item><a
          routerLink="/pages/inventory/returning-materials-to-production">生产退料单</a></d-breadcrumb-item>
      <d-breadcrumb-item>生产退料单—详情</d-breadcrumb-item>
    </d-breadcrumb>
  </div>
  <div class="da-content-wrapper">

    <div class="da-form-container ">
      <div class="card">
        <div class="card-title">
          <p class="form-title">{{detail.jobOrderIssueNum}}</p>
        </div>
        <div class="card-body">
          <div class="basic">
            <div class="basic-title">
              <h4>基础信息</h4>
            </div>
            <div class="basic-items">
              <div class="basic-item">
                <label>生产退料单号:</label>
                <div class="basic-item-data">
                  <span>{{detail.jobOrderReturnNum}}</span>
                </div>
              </div>

              <div class="basic-item">
                <label>制单人:</label>
                <div class="basic-item-data">
                  <span>{{detail.creatorName}}</span>
                </div>
              </div>
              <div class="basic-item">
                <label>制单日期:</label>
                <div class="basic-item-data">
                  <span>{{detail.createTime}}</span>
                </div>
              </div>
              <div class="basic-item">
                <label>是否入库:</label>
                <div class="basic-item-data">
                  <span>{{detail.isReturn | booleanToText:'已入库':'未入库'}}</span>
                </div>
              </div>
            </div>

          </div>
          <div class="">
            <h4>物料信息</h4>
          </div>
          <div class="table-body">
            <d-data-table [dataSource]="tableData" [tableOverflowType]="'auto'" [scrollable]="true" [fixHeader]="true"
              [tableWidthConfig]="tableWidthConfig">
              <thead dTableHead>
                <tr dTableRow>
                  <th dHeadCell *ngFor="let colOption of dataTableOptions.columns">{{ colOption.header }}</th>
                </tr>
              </thead>
              <tbody dTableBody>
                <ng-template let-rowItem="rowItem" let-rowIndex="rowIndex">
                  <tr dTableRow>
                    <td dTableCell><span  dTooltip [content]="rowItem?.jobNum">{{rowItem.jobNum}}</span></td>
                    <td dTableCell><span dTooltip [content]="rowItem?.processName">{{rowItem.processName}}</span></td>
                    <td dTableCell><span dTooltip [content]="rowItem?.partName">{{rowItem.partName}}</span></td>
                    <td dTableCell><span dTooltip [content]="rowItem?.partType">{{rowItem.partType}}</span></td>
                    <td dTableCell><span dTooltip [content]="rowItem?.partUOM">{{rowItem.partUOM}}</span></td>
                    <td dTableCell><span dTooltip [content]="rowItem?.requirementQuantity">{{rowItem.requirementQuantity}}</span></td>
                    <td dTableCell><span dTooltip [content]="rowItem?.issueQuantity">{{rowItem.issueQuantity}}</span></td>
                    <td dTableCell><span dTooltip [content]="rowItem?.returnQuantity">{{rowItem.returnQuantity}}</span></td>
                    <td dTableCell><span dTooltip [content]="rowItem?.warehouseName">{{rowItem.warehouseName}}</span></td>
                    <td dTableCell><span dTooltip [content]="rowItem?.positionName">{{rowItem.positionName}}</span></td>
                  </tr>
                </ng-template>
              </tbody>
            </d-data-table>
          </div>
          <div class="cancle">
            <d-button class="ms-3" bsStyle="common" (click)="cancle()">返回</d-button>
          </div>
        </div>
      </div>
    </div>

  </div>
</div>
